package edu.luc.cs.laufer.cs473.shapealgebra

import java.awt.Color

/*
 * Some additional shape classes added later.
 */

// TODO: your job
abstract class moreShapes extends Shape
case class Stroke(c: Color, shape:Shape) extends moreShapes
case class Fill(shape: Shape) extends moreShapes
case class Outline(shape: Shape) extends moreShapes

case class Point(x: Int, y: Int) extends moreShapes

class PolyComposite(points: Point*) extends moreShapes {
  if (points isEmpty) {
    throw new IllegalArgumentException("empty Poly composite")
  }
  if (points.contains(null)) {
    throw new IllegalArgumentException("null child in poly composite")
  }
}
case class Polygon(points: Point*) extends PolyComposite(points: _*)


